package com.googlecode.ozonbooksfinder.flexspaghetti.events
{
	import com.googlecode.ozonbooksfinder.domain.Book;
	
	import flash.events.Event;

	public class FavoritesEvent extends Event
	{
		public static const ADD_TO_FAVORITES:String = "addToFavorites";
		public static const REMOVE_FROM_FAVORITES:String = "removeFromFavorites";
		
		public var book:Book;
		
		public function FavoritesEvent(type:String, book:Book,
			bubbles:Boolean=false, cancelable:Boolean=false)
		{
			super(type, bubbles, cancelable);
			this.book = book;
		}
		
		override public function clone():Event
		{
			var result:FavoritesEvent = 
				new FavoritesEvent (type, book, 
				bubbles, cancelable);
			return result;
		}
	}
}